File: ccamcmd.c

package info (click to toggle)
camserv 0.42-9
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,884 kB
  • ctags: 1,123
  • sloc: ansic: 19,694; sh: 7,454; makefile: 206
file content (24 lines) | stat: -rw-r--r-- 450 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <stdio.h>
#include <stdlib.h>

#include "socket.h"
#include "camcmd.h"

#define MODNAME "ccamcmd"

int main( int argc, char *argv[] ){
  Socket *cmdsock;

  if( argc != 4 ) {
    fprintf( stderr, "Syntax: %s <camservIP> <camservPort> <password>\n",
	     argv[0]);
    return -1;
  }

  cmdsock = camcmd_connect( argv[ 1 ], atoi( argv[ 2 ] ), argv[ 3] );
  if( cmdsock == NULL )
    return -1;

  camcmd_disconnect( cmdsock );
  return 0;
}