Index: apps/app_record.c =================================================================== --- apps/app_record.c (revision 42420) +++ apps/app_record.c (working copy) @@ -209,7 +209,7 @@ ast_copy_string(tmp + tmplen, &(fname.piece[i][1]), sizeof(tmp) - tmplen); } count++; - } while ( ast_fileexists(tmp, ext, chan->language) != -1 ); + } while ( ast_fileexists(tmp, ext, chan->language) > 0 ); pbx_builtin_setvar_helper(chan, "RECORDED_FILE", tmp); } else strncpy(tmp, filename, sizeof(tmp)-1);