mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
unescape things like '\n' in messages
This commit is contained in:
parent
4207df8078
commit
b5f35fab78
1 changed files with 4 additions and 2 deletions
|
@ -568,19 +568,21 @@ cmd_devs( int socket, const char* cmd, int argc, gchar** args )
|
|||
|
||||
/* Send to each in the list */
|
||||
const char* msg = args[2];
|
||||
gchar* unesc = g_strcompress( msg );
|
||||
vector<DevIDRelay>::const_iterator iter;
|
||||
for ( iter = devids.begin(); devids.end() != iter; ++iter ) {
|
||||
DevIDRelay devid = *iter;
|
||||
if ( 0 != devid ) {
|
||||
if ( post_message( devid, msg, onAckProc,
|
||||
if ( post_message( devid, unesc, onAckProc,
|
||||
(void*)socket ) ) {
|
||||
string_printf( result, "posted message: %s\n", msg );
|
||||
string_printf( result, "posted message: %s\n", unesc );
|
||||
} else {
|
||||
string_printf( result, "unable to post; does "
|
||||
"dev %d exist\n", devid );
|
||||
}
|
||||
}
|
||||
}
|
||||
g_free( unesc );
|
||||
|
||||
found = true;
|
||||
} else if ( 0 == strcmp( "rm", args[1] ) && 2 < argc ) {
|
||||
|
|
Loading…
Add table
Reference in a new issue