X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/blobdiff_plain/968f523cfe43ee6c627bbe39ae837262b898e3a0..refs/heads/LOCKING:/gen/pobox.dc diff --git a/gen/pobox.dc b/gen/pobox.dc index 2be2e2a3..bba1e2ec 100644 --- a/gen/pobox.dc +++ b/gen/pobox.dc @@ -14,6 +14,7 @@ #include #include #include +#include EXEC SQL INCLUDE sqlca; extern int errno; @@ -79,7 +80,7 @@ char **argv; strtrim(login); strtrim(id); if (isdigit(id[0])) - fprintf(out, "%s %s@ATHENA.MIT.EDU\n", id, login); + fprintf(out, "%s %s@MIT.EDU\n", id, login); } EXEC SQL CLOSE x; @@ -99,6 +100,8 @@ char **argv; !strcasecmp(".local", string + i - 6)) { string[i-6] = 0; fprintf(out, "%s %s.mit.edu\n", id, string); + } else if ( !strchr(string, '@') ) { + fprintf(out, "%s %s@mit.edu\n", id, string); } else fprintf(out, "%s %s\n", id, string); } @@ -123,6 +126,10 @@ char **argv; sqlerr: com_err(whoami, MR_INGRES_ERR, " code %d\n", sqlca.sqlcode); +#ifsql INGRES + if (sqlca.sqlcode == 17700 || sqlca.sqlcode == -37000) + exit(MR_DEADLOCK); +#endsql critical_alert("DCM", "Pobox build encountered INGRES ERROR %d", sqlca.sqlcode); exit(MR_INGRES_ERR);