version 1.29 | | version 1.30 |
---|
| | |
/* | | /* |
* static char *rcsid_sock_info_c = | | * static char *rcsid_sock_info_c = |
* "$Id: info.c,v 1.29 2006/05/21 10:35:10 akirschbaum Exp $"; | | * "$Id: info.c,v 1.30 2006/09/04 07:21:05 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
return; | | return; |
| | |
if (pri>=pl->contr->listening) return; | | if (pri>=pl->contr->listening) return; |
| | |
if (!CLIENT_SUPPORT_READABLES(&pl->contr->socket,type)){ | | if (!CLIENT_SUPPORT_READABLES(&pl->contr->socket,type)){ |
char *buf = (char*)malloc(strlen(oldmessage==NULL?message:oldmessage)+1); | | char *buf = (char*)malloc(strlen(oldmessage==NULL?message:oldmessage)+1); |
if (buf==NULL) | | if (buf==NULL) |
| | |
| | |
void draw_ext_info_format( | | void draw_ext_info_format( |
int flags, int pri, const object *pl, uint8 type, | | int flags, int pri, const object *pl, uint8 type, |
uint8 subtype, const char* old_format, | | uint8 subtype, |
const char* new_format, ...){ | | const char* new_format, |
| | const char* old_format, |
| | ...) |
| | { |
| | |
char buf[HUGE_BUF]; | | char buf[HUGE_BUF]; |
| | |
if(!pl || (pl->type!=PLAYER) || (pl->contr==NULL)) | | if(!pl || (pl->type!=PLAYER) || (pl->contr==NULL)) |
return; | | return; |
| | |
if (pri>=pl->contr->listening) return; | | if (pri>=pl->contr->listening) return; |
| | |
if (!CLIENT_SUPPORT_READABLES(&pl->contr->socket,type)){ | | if (!CLIENT_SUPPORT_READABLES(&pl->contr->socket,type)){ |
va_list ap; | | va_list ap; |
| | |
LOG(llevDebug,"Non supported extension text type for client.\n"); | | LOG(llevDebug,"Non supported extension text type for client.\n"); |
va_start(ap, new_format); | | va_start(ap, old_format); |
vsnprintf(buf, HUGE_BUF, old_format, ap); | | vsnprintf(buf, HUGE_BUF, old_format, ap); |
va_end(ap); | | va_end(ap); |
| | |
| | /* Should this be here? old_format must be set, so in theory, the caller |
| | * should not put tags in it. But what about cases where it may be using |
| | * data external to the call itself (eg, op->msg, where the message |
| | * itself may contain tags?) |
| | */ |
| | strip_media_tag(buf); |
new_draw_info(flags, pri, pl, buf); | | new_draw_info(flags, pri, pl, buf); |
return; | | return; |
}else{ | | }else{ |
va_list ap; | | va_list ap; |
va_start(ap, new_format); | | va_start(ap, old_format); |
vsnprintf(buf, HUGE_BUF, new_format, ap); | | vsnprintf(buf, HUGE_BUF, new_format, ap); |
va_end(ap); | | va_end(ap); |
strip_media_tag(buf); | | |
esrv_print_ext_msg(&pl->contr->socket,flags&NDI_COLOR_MASK,type,subtype,buf); | | esrv_print_ext_msg(&pl->contr->socket,flags&NDI_COLOR_MASK,type,subtype,buf); |
} | | } |
} | | } |