if( j > 1 ) {
printf("%i items dispensed\n", j);
}
+ Dispense_ShowUser(sock, gsUserName);
close(sock);
- }
- Dispense_ShowUser(sock, gsUserName);
+ }
return ret;
}
char *actualUsername;
char *srcName, *dstName;
+ // HACK: Naming a slot "dead" disables it (catch for snack)
+ if( strcmp(ReasonGiven, "dead") == 0 )
+ return 1;
+
if( Ammount < 0 ) return 1; // Um... negative give? Not on my watch!
ret = _Transfer( SrcUser, DestUser, Ammount, ReasonGiven );
}
// In child
// - Sort out stdin/stdout
+ #if 0
dup2( open("/dev/null", O_RDONLY, 0644), STDIN_FILENO );
dup2( open(gsServer_LogFile, O_CREAT|O_APPEND, 0644), STDOUT_FILENO );
dup2( open(gsServer_ErrorLog, O_CREAT|O_APPEND, 0644), STDERR_FILENO );
+ #else
+ freopen("/dev/null", "r", stdin);
+ freopen(gsServer_LogFile, "a", stdout);
+ freopen(gsServer_ErrorLog, "a", stderr);
+ #endif
}
// Start the helper thread