source: roaraudio/libroar/basic.c @ 5425:2c3f247e8f9a

Last change on this file since 5425:2c3f247e8f9a was 5406:3a3e9d18f561, checked in by phi, 12 years ago

Ported to Win32 (again...) (pr1)

File size: 17.5 KB
Line 
1//basic.c:
2
3/*
4 *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008-2012
5 *
6 *  This file is part of libroar a part of RoarAudio,
7 *  a cross-platform sound system for both, home and professional use.
8 *  See README for details.
9 *
10 *  This file is free software; you can redistribute it and/or modify
11 *  it under the terms of the GNU General Public License version 3
12 *  as published by the Free Software Foundation.
13 *
14 *  libroar is distributed in the hope that it will be useful,
15 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 *  GNU General Public License for more details.
18 *
19 *  You should have received a copy of the GNU General Public License
20 *  along with this software; see the file COPYING.  If not, write to
21 *  the Free Software Foundation, 51 Franklin Street, Fifth Floor,
22 *  Boston, MA 02110-1301, USA.
23 *
24 *  NOTE for everyone want's to change something and send patches:
25 *  read README and HACKING! There a addition information on
26 *  the license of this document you need to read before you send
27 *  any patches.
28 *
29 *  NOTE for uses of non-GPL (LGPL,...) software using libesd, libartsc
30 *  or libpulse*:
31 *  The libs libroaresd, libroararts and libroarpulse link this lib
32 *  and are therefore GPL. Because of this it may be illigal to use
33 *  them with any software that uses libesd, libartsc or libpulse*.
34 */
35
36#include "libroar.h"
37
38static int _start_server(struct roar_connection * con, const char * server, int type, int flags, uint_least32_t timeout) {
39#if !defined(ROAR_TARGET_WIN32) && !defined(ROAR_TARGET_MICROCONTROLLER)
40 enum {
41  NORMAL = 0,
42  SYSTEM = 1
43 } mode = NORMAL;
44 const char * daemonimage = NULL;
45 int socks[2];
46 int r;
47 char fhstr[12];
48
49 if ( !strncmp(server, "+fork=", 6) ) {
50  server += 6;
51  if ( server[0] == 0 ) {
52   // no special case, we just ignore it.
53  } else if ( server[0] == 'd' && server[1] == ':' ) {
54   server += 2;
55   daemonimage = server;
56  } else if ( server[0] == '!' ) {
57   server += 1;
58   daemonimage = server;
59   mode = SYSTEM;
60  } else {
61   roar_err_set(ROAR_ERROR_ILLSEQ);
62   return -1;
63  }
64 }
65
66 if ( daemonimage == NULL )
67  daemonimage = roar_libroar_get_config()->daemonimage;
68
69 // we keep this step to be compatible with older versions.
70 if ( daemonimage == NULL || *daemonimage == 0 ) {
71  daemonimage = getenv("ROAR_DAEMONIMAGE");
72  if ( daemonimage != NULL ) {
73   ROAR_WARN("_start_server(*): Usage of $ROAR_DAEMONIMAGE is obsolete. Use ROAR_OPTIONS=daemonimage:...");
74  }
75 }
76
77 if ( daemonimage == NULL || *daemonimage == 0 )
78  daemonimage = "roard";
79
80 if ( socketpair(AF_UNIX, SOCK_STREAM, 0, socks) == -1 ) {
81  roar_err_from_errno();
82  return -1;
83 }
84
85 r = roar_fork(NULL);
86
87 if ( r == -1 ) { // error!
88  ROAR_ERR("_start_server(*): Can not fork: %s", roar_error2str(roar_error));
89  close(socks[0]);
90  close(socks[1]);
91  return -1;
92 } else if ( r == 0 ) { // we are the child
93  close(socks[0]);
94
95  close(ROAR_STDIN ); // we do not want roard to have any standard input
96  close(ROAR_STDOUT); // STDOUT is also not needed, so we close it,
97                      // but STDERR we keep open for error messages.
98
99  snprintf(fhstr, sizeof(fhstr), "%i", socks[1]);
100
101  switch (mode) {
102   case NORMAL:
103     execlp(daemonimage, daemonimage, "--no-listen", "--client-fh", fhstr, (_LIBROAR_GOOD_CAST char*)NULL);
104    break;
105   case SYSTEM:
106     dup2(socks[1], ROAR_STDIN );
107     dup2(socks[1], ROAR_STDOUT);
108     execl("/bin/sh", "/bin/sh", "-c", daemonimage, (_LIBROAR_GOOD_CAST char*)NULL);
109     execlp("sh", "sh", "-c", daemonimage, (_LIBROAR_GOOD_CAST char*)NULL);
110    break;
111  }
112
113  // we are still alive?
114  ROAR_ERR("_start_server(*): alive after exec(), that's bad!");
115  _exit(1);
116 } else { // we are the parent
117  close(socks[1]);
118  if ( roar_vio_open_fh_socket(con->viocon, socks[0]) == -1 ) {
119   close(socks[0]);
120   return -1;
121  } else {
122   con->flags |= ROAR_CON_FLAGS_VIO;
123  }
124  return 0;
125 }
126
127 return -1;
128#else
129 ROAR_ERR("_start_server(*): There is no UNIX Domain Socket support in win32, download a real OS.");
130 return -1;
131#endif
132}
133
134static int _connect_internal(struct roar_connection * con, const char * server, int type, int flags, uint_least32_t timeout) {
135 struct roar_libroar_config * config = roar_libroar_get_config();
136 struct roar_vio_calls * vio;
137
138 if ( config->connect_internal != NULL ) {
139  vio = config->connect_internal(con, server, type, flags, timeout);
140  if ( vio == NULL )
141   return -1;
142
143  con->viocon = vio;
144  con->flags |= ROAR_CON_FLAGS_VIO;
145
146  return 0;
147 }
148
149 roar_err_set(ROAR_ERROR_BADHOST);
150 return -1;
151}
152
153static int _connect_server(struct roar_connection * con, const char * server, int type, int flags, uint_least32_t timeout) {
154#if defined(ROAR_HAVE_STAT) && defined(ROAR_HAVE_H_SYS_STAT)
155 struct stat sockstat;
156#endif
157 const char * obj = NULL;
158 char user_sock[128];
159 int is_decnet = 0;
160 int port = 0;
161 int i = 0;
162 int fh = -1;
163 int err;
164
165 if ( con == NULL || server == NULL ) {
166  roar_err_set(ROAR_ERROR_FAULT);
167  return -1;
168 }
169
170 if ( !strcmp(server, "+invalid") ) {
171  roar_err_set(ROAR_ERROR_CANCELED);
172  return -1;
173 } else if ( !strncmp(server, "+dstr=", 6) ) {
174  if ( roar_vio_open_dstr_simple(con->viocon, server+6, ROAR_VIOF_READWRITE) == -1 )
175   return -1;
176  con->flags |= ROAR_CON_FLAGS_VIO;
177  return 0;
178 } else if ( !strcmp(server, "+fork") || !strncmp(server, "+fork=", 6) ) {
179  return _start_server(con, server, type, flags, timeout);
180 } else if ( !strcmp(server, "+internal") || !strncmp(server, "+internal=", 10) ) {
181  return _connect_internal(con, server, type, flags, timeout);
182 }
183
184 strncpy(user_sock, server, sizeof(user_sock)-1);
185 user_sock[sizeof(user_sock)-1] = 0;
186
187
188 if ( *user_sock != '/' ) { // don't test AF_UNIX sockets for ports
189  for (i = 0; user_sock[i] != 0; i++) {
190   if ( user_sock[i] == ':' ) {
191    if ( user_sock[i+1] == ':' ) { // DECnet, leave unchanged
192     is_decnet = 1;
193     obj = &user_sock[i+2];
194     break;
195    }
196
197    port = atoi(&(user_sock[i+1]));
198    user_sock[i] = 0;
199    break;
200   }
201  }
202 }
203
204 if ( is_decnet ) {
205  if ( *user_sock == ':' ) {
206   if ( roar_socket_get_local_nodename() != NULL ) {
207    strncpy(user_sock, roar_socket_get_local_nodename(), sizeof(user_sock)-1);
208    user_sock[sizeof(user_sock)-1] = 0;
209    roar_mm_strlcat(user_sock, server, sizeof(user_sock)-1);
210    user_sock[sizeof(user_sock)-1] = 0;
211    obj  = strstr(user_sock, "::");
212    obj += 2;
213   }
214  }
215
216  if ( *obj == 0 ) {
217#ifdef DN_MAXOBJL
218   roar_mm_strlcat(user_sock, ROAR_DEFAULT_OBJECT, sizeof(user_sock)-1);
219   user_sock[sizeof(user_sock)-1] = 0;
220#else
221   ROAR_ERR("roar_connect_raw(*): size of DECnet object unknown.");
222#endif
223  }
224   ROAR_DBG("roar_connect_raw(*): user_sock='%s'", user_sock);
225 }
226
227 if ( port || is_decnet ) {
228  fh = roar_socket_connect(type, user_sock, port);
229  // restore the original string
230  user_sock[i] = ':';
231 } else {
232#if defined(ROAR_HAVE_STAT) && defined(ROAR_HAVE_H_SYS_STAT)
233  if ( user_sock[0] == '/' ) {
234   if ( stat(user_sock, &sockstat) == 0 ) {
235    if ( S_ISCHR(sockstat.st_mode) ) {
236#ifdef O_NOCTTY
237     return open(user_sock, O_RDWR|O_NOCTTY, 0666);
238#else
239     return open(user_sock, O_RDWR, 0666);
240#endif
241    }
242   }
243  }
244#endif
245  fh = roar_socket_connect(type, user_sock, ROAR_DEFAULT_PORT);
246 }
247
248 if ( fh == -1 )
249  return -1;
250
251 if ( roar_vio_open_fh_socket(con->viocon, fh) == -1 ) {
252  err = roar_error;
253#ifdef ROAR_TARGET_WIN32
254  closesocket(fh);
255#else
256  close(fh);
257#endif
258  roar_error = err;
259  return -1;
260 } else {
261  con->flags |= ROAR_CON_FLAGS_VIO;
262 }
263
264 roar_err_set(ROAR_ERROR_NONE);
265 return 0;
266}
267
268static int roar_connect_raw (struct roar_connection * con, const char * server, int flags, uint_least32_t timeout) {
269#ifdef ROAR_HAVE_LIBSLP
270 struct roar_libroar_config * config = roar_libroar_get_config();
271#endif
272#if defined(ROAR_HAVE_UNIX) || !defined(ROAR_TARGET_MICROCONTROLLER)
273 char user_sock[128];
274 char * roar_server;
275#endif
276#if defined(ROAR_HAVE_LIBSLP) || !defined(ROAR_TARGET_MICROCONTROLLER)
277 int i = 0;
278#endif
279#if !defined(ROAR_TARGET_WIN32) && !defined(ROAR_TARGET_MICROCONTROLLER)
280 struct passwd * pwd;
281#endif
282#ifdef ROAR_HAVE_LIBDNET
283 struct stat decnet_stat;
284#endif
285#ifdef ROAR_HAVE_LIBX11
286 struct roar_x11_connection * x11con;
287#endif
288#ifdef ROAR_HAVE_LIBSLP
289 struct roar_server * list;
290 int workarounds_store;
291#endif
292
293 roar_err_set(ROAR_ERROR_UNKNOWN);
294
295 if ( timeout != 0 ) {
296  roar_err_set(ROAR_ERROR_INVAL);
297  return -1;
298 }
299
300 if ( flags & ROAR_ENUM_FLAG_HARDNONBLOCK )
301  flags |= ROAR_ENUM_FLAG_NONBLOCK;
302
303
304 if ( server == NULL || *server == 0 )
305  server = roar_libroar_get_server();
306
307 if ( server == NULL || *server == 0 )
308  server = getenv("ROAR_SERVER");
309
310#ifdef ROAR_HAVE_LIBX11
311 if ( server == NULL || *server == 0 ) {
312  if ( (x11con = roar_x11_connect(NULL)) != NULL ) {
313   server = roar_x11_get_prop(x11con, "ROAR_SERVER");
314   roar_x11_disconnect(x11con);
315  }
316 }
317#endif
318
319#if !defined(ROAR_TARGET_WIN32) && !defined(ROAR_TARGET_MICROCONTROLLER)
320 if ( (server == NULL || *server == 0) && (i = readlink("/etc/roarserver", user_sock, sizeof(user_sock)-1)) != -1 ) {
321   user_sock[i] = 0;
322   server = user_sock;
323 }
324#endif
325
326 if ( server != NULL && !strcasecmp(server, "+slp") ) {
327  server = roar_slp_find_roard(0);
328  if ( server == NULL ) {
329   return -1;
330  }
331 }
332
333 if ( server == NULL || *server == 0 ) {
334  /* connect via defaults */
335
336#ifdef ROAR_HAVE_UNIX
337#ifndef ROAR_TARGET_MICROCONTROLLER
338  roar_server = getenv("HOME");
339#else
340  roar_server = NULL;
341#endif
342
343  if ( roar_server == NULL ) {
344#if !defined(ROAR_TARGET_WIN32) && !defined(ROAR_TARGET_MICROCONTROLLER)
345   if ( (pwd = getpwuid(getuid())) == NULL ) {
346    roar_server = "/NX-HOME-DIR";
347   } else {
348    roar_server = pwd->pw_dir;
349   }
350#else
351   roar_server = "/WIN32-SUCKS";
352#endif
353  }
354
355  snprintf(user_sock, sizeof(user_sock)-1, "%s/%s", roar_server, ROAR_DEFAULT_SOCK_USER);
356  user_sock[sizeof(user_sock)-1] = 0;
357
358  if ( _connect_server(con, user_sock, ROAR_SOCKET_TYPE_UNIX, flags, timeout) == 0 )
359   return 0;
360
361  if ( _connect_server(con, ROAR_DEFAULT_SOCK_GLOBAL, ROAR_SOCKET_TYPE_UNIX, flags, timeout) == 0 )
362   return 0;
363#endif
364
365  if ( _connect_server(con, ROAR_DEFAULT_HOSTPORT, ROAR_SOCKET_TYPE_TCP, flags, timeout) == 0 )
366   return 0;
367
368#ifdef ROAR_HAVE_LIBDNET
369  if ( stat(ROAR_PROC_NET_DECNET, &decnet_stat) == 0 ) {
370   if ( roar_socket_get_local_nodename() ) {
371    snprintf(user_sock, 79, "%s::%s", roar_socket_get_local_nodename(), ROAR_DEFAULT_OBJECT);
372    if ( _connect_server(con, user_sock, ROAR_SOCKET_TYPE_DECNET, flags, timeout) == 0 )
373     return 0;
374   }
375  }
376#endif
377
378  if ( _connect_server(con, "+abstract", ROAR_SOCKET_TYPE_UNKNOWN, flags, timeout) == 0 )
379   return 0;
380
381#ifdef ROAR_HAVE_LIBSLP
382 if ( !(config->workaround.workarounds & ROAR_LIBROAR_CONFIG_WAS_NO_SLP) &&
383      !(flags & ROAR_ENUM_FLAG_NONBLOCK) &&
384      !(flags & ROAR_ENUM_FLAG_LOCALONLY)
385    ) {
386  if ( (server = roar_slp_find_roard(0)) != NULL ) {
387   if ( _connect_server(con, server, ROAR_SOCKET_TYPE_UNKNOWN, 0, 0) == 0 )
388    return 0;
389
390   /* in case we can not connect to the server given this may be a cache problem,
391      we do a new lookup with the cache disabled in this case                     */
392   ROAR_WARN("roar_connect_raw(*): Can not connect to SLP located server, disabling cache");
393   if ( (server = roar_slp_find_roard(1)) != NULL )
394    if ( _connect_server(con, server, ROAR_SOCKET_TYPE_UNKNOWN, 0, 0) == 0 )
395     return 0;
396  }
397 }
398
399 workarounds_store = config->workaround.workarounds;
400 config->workaround.workarounds |= ROAR_LIBROAR_CONFIG_WAS_NO_SLP;
401 list = roar_enum_servers(flags, -1, -1);
402 config->workaround.workarounds = workarounds_store;
403 if ( list != NULL ) {
404  for (i = 0; list[i].server != NULL; i++) {
405   if ( _connect_server(con, list[i].server, ROAR_SOCKET_TYPE_UNKNOWN, 0, 0) == 0 ) {
406    roar_enum_servers_free(list);
407    return 0;
408   }
409  }
410  roar_enum_servers_free(list);
411 }
412#endif
413
414 return -1;
415
416 } else {
417  /* connect via (char*)server */
418  if ( _connect_server(con, server, ROAR_SOCKET_TYPE_UNKNOWN, flags, timeout) != 0 )
419   return -1;
420  return 0;
421 }
422
423 roar_err_set(ROAR_ERROR_NODEV);
424 ROAR_DBG("roar_connect_raw(*) = -1 // error=NODEV");
425 return -1;
426}
427
428int roar_connect     (struct roar_connection * con, const char * server, int flags, uint_least32_t timeout) {
429 struct roar_libroar_config * config = roar_libroar_get_config();
430
431 if ( con == NULL ) {
432  roar_err_set(ROAR_ERROR_FAULT);
433  return -1;
434 }
435
436 if ( roar_connect_none(con) == -1 )
437  return -1;
438
439 roar_err_set(ROAR_ERROR_UNKNOWN);
440 if ( roar_connect_raw(con, server, flags | config->serverflags, timeout) == -1 )
441  return -1;
442
443 // TODO: this should be moved to be within _connect_server() so it also stores server names of auto located servers.
444 if ( server != NULL ) {
445  con->server_name = roar_mm_strdup(server);
446 }
447
448 return 0;
449}
450
451int roar_connect_none (struct roar_connection * con) {
452 if ( con == NULL ) {
453  roar_err_set(ROAR_ERROR_INVAL);
454  return -1;
455 }
456
457 memset(con, 0, sizeof(struct roar_connection));
458 con->refc        = 1;
459 con->flags       = ROAR_CON_FLAGS_NONE;
460 con->version     = 0;
461 con->cb_userdata = NULL;
462 con->cb          = NULL;
463 con->server_stds = NULL;
464 con->server_name = NULL;
465
466 roar_err_init(&(con->errorframe));
467
468 con->viocon = &(con->viocon_store);
469
470// con->flags |= ROAR_CON_FLAGS_VIO;
471
472 roar_err_set(ROAR_ERROR_NONE);
473 return 0;
474}
475
476int roar_connect_vio (struct roar_connection * con, struct roar_vio_calls * vio) {
477 if ( con == NULL || vio == NULL ) {
478  roar_err_set(ROAR_ERROR_INVAL);
479  return -1;
480 }
481
482 if ( roar_connect_none(con) == -1 )
483  return -1;
484
485 con->viocon = vio;
486 con->flags |= ROAR_CON_FLAGS_VIO;
487
488 return -1;
489}
490
491int roar_connect_fh (struct roar_connection * con, int fh) {
492
493 if ( con == NULL || fh == -1 ) {
494  roar_err_set(ROAR_ERROR_INVAL);
495  return -1;
496 }
497
498 if ( roar_connect_none(con) == -1 )
499  return -1;
500
501 // specal hack to set an ilegal value used internaly in libroar:
502 if ( fh == -2 )
503  fh = -1;
504
505 if ( roar_vio_open_fh_socket(con->viocon, fh) != -1 ) {
506  con->flags |= ROAR_CON_FLAGS_VIO;
507 }
508
509 roar_err_set(ROAR_ERROR_NONE);
510 return 0;
511}
512
513int roar_get_connection_fh (struct roar_connection * con) {
514 int fh;
515
516 ROAR_DBG("roar_get_connection_fh(con=%p) = ?", con);
517
518 roar_debug_warn_sysio("roar_get_connection_fh", "roar_get_connection_vio2", NULL);
519
520 if ( con == NULL )
521  return -1;
522
523 ROAR_DBG("roar_get_connection_fh(con=%p) = ?", con);
524
525 if ( roar_vio_ctl(con->viocon, ROAR_VIO_CTL_GET_FH, &fh) == -1 )
526  return -1;
527
528 ROAR_DBG("roar_get_connection_fh(con=%p) = %i", con, fh);
529
530 return fh;
531}
532
533struct roar_vio_calls * roar_get_connection_vio2 (struct roar_connection * con) {
534 if ( con == NULL )
535  return NULL;
536
537 if ( con->flags & ROAR_CON_FLAGS_VIO )
538  return con->viocon;
539
540// TODO: try to open the VIO.
541
542 return NULL;
543}
544
545const char * roar_get_connection_server(struct roar_connection * con) {
546 if ( con == NULL ) {
547  roar_err_set(ROAR_ERROR_FAULT);
548  return NULL;
549 }
550
551 return con->server_name;
552}
553
554int roar_connectionref(struct roar_connection * con) {
555 if ( con == NULL ) {
556  roar_err_set(ROAR_ERROR_FAULT);
557  return -1;
558 }
559
560 con->refc++;
561
562 return 0;
563}
564
565int roar_connectionunref(struct roar_connection * con) {
566 struct roar_vio_calls * vio;
567 struct roar_message m;
568
569 if ( con == NULL ) {
570  roar_err_set(ROAR_ERROR_FAULT);
571  return -1;
572 }
573
574 con->refc--;
575
576 if ( con->refc )
577  return 0;
578
579 memset(&m, 0, sizeof(m));
580
581 m.datalen =  0;
582 m.stream  = -1;
583 m.pos     =  0;
584 m.cmd     = ROAR_CMD_QUIT;
585
586 roar_req(con, &m, NULL);
587
588 if ( (vio = roar_get_connection_vio2(con)) != NULL ) {
589  roar_vio_close(vio);
590 }
591
592 if ( con->server_stds != NULL ) {
593  roar_stds_free(con->server_stds);
594  con->server_stds = NULL;
595 }
596
597 if ( con->server_name != NULL ) {
598  roar_mm_free(con->server_name);
599  con->server_name = NULL;
600 }
601
602 if ( con->flags & ROAR_CON_FLAGS_FREESELF ) {
603  roar_mm_free(con);
604 } else {
605  roar_connect_fh(con, -2);
606 }
607
608 return 0;
609}
610
611int roar_set_connection_callback(struct roar_connection * con,
612                                 void (*cb)(struct roar_connection * con,
613                                            struct roar_message    * mes,
614                                            void                   * data,
615                                            void                   * userdata),
616                                 void * userdata) {
617 if ( con == NULL )
618  return -1;
619
620 con->cb       = cb;
621 con->cb_userdata = userdata;
622
623 return 0;
624}
625
626int roar_sync         (struct roar_connection * con) {
627 // wait for any non-client reqs
628 return roar_wait_msg(con, 0x0000, 0x8000);
629}
630
631int roar_wait_msg     (struct roar_connection * con, int16_t seq, int16_t seqmask) {
632 roar_err_set(ROAR_ERROR_NOSYS);
633 return -1;
634}
635
636int roar_noop         (struct roar_connection * con) {
637 struct roar_message mes;
638
639 if ( con == NULL ) {
640  roar_err_set(ROAR_ERROR_FAULT);
641  return -1;
642 }
643
644 memset(&mes, 0, sizeof(mes));
645
646 mes.cmd = ROAR_CMD_NOOP;
647 mes.stream = -1;
648
649 return roar_req3(con, &mes, NULL);
650}
651
652int roar_identify   (struct roar_connection * con, const char * name) {
653 struct roar_message mes;
654 uint32_t pid;
655 int max_len;
656
657 roar_err_set(ROAR_ERROR_UNKNOWN);
658
659 ROAR_DBG("roar_identify(*): try to identify myself...");
660
661 memset(&mes, 0, sizeof(mes));
662
663 mes.cmd    = ROAR_CMD_IDENTIFY;
664 mes.stream = -1;
665 mes.pos    =  0;
666
667 ROAR_DBG("roar_identify(*): name=%p", name);
668
669 if ( name == NULL )
670  name = "libroar client";
671
672 ROAR_DBG("roar_identify(*): name=%p", name);
673
674 max_len = roar_mm_strlen(name);
675 ROAR_DBG("roar_identify(*): strlen(name) = %i", max_len);
676
677 if ( max_len > (LIBROAR_BUFFER_MSGDATA - 5) )
678  max_len = LIBROAR_BUFFER_MSGDATA - 5;
679
680 mes.datalen = 5 + max_len;
681 mes.data[0] = 1;
682
683 pid = getpid();
684 mes.data[1] = (pid & 0xFF000000UL) >> 24;
685 mes.data[2] = (pid & 0x00FF0000UL) >> 16;
686 mes.data[3] = (pid & 0x0000FF00UL) >>  8;
687 mes.data[4] = (pid & 0x000000FFUL) >>  0;
688 ROAR_DBG("roar_identify(*): pid = %i", (int)pid);
689
690 strncpy(mes.data+5, name, max_len);
691
692 return roar_req3(con, &mes, NULL);
693}
694
695//ll
Note: See TracBrowser for help on using the repository browser.