better fix for r4532

This commit is contained in:
Charles Kerr 2008-01-07 00:42:53 +00:00
parent bb203a4969
commit a88af6a758
1 changed files with 6 additions and 2 deletions

View File

@ -761,7 +761,7 @@ ipc_addstat( benc_val_t * list, int tor,
error = st->error;
if( TR_OK == error )
{
tr_bencInitStr( item, "other", -1, 1 );
tr_bencInitStr( item, "", -1, 1 );
}
else if( TR_ERROR_ISSET( TR_ERROR_ASSERT, error ) )
{
@ -801,10 +801,14 @@ ipc_addstat( benc_val_t * list, int tor,
}
break;
case IPC_ST_ERRMSG:
if( '\0' == st->errorString[0] )
if( TR_OK == st->error )
{
tr_bencInitStr( item, "", -1, 1 );
}
else if( '\0' == st->errorString[0] )
{
tr_bencInitStr( item, "other", -1, 1 );
}
else if( tr_bencInitStrDup( item, st->errorString ) )
{
return -1;