3 /* gras_addons - several addons to do specific stuff not in GRAS itself */
5 /* Authors: Martin Quinson */
6 /* Copyright (C) 2003 the OURAGAN project. */
8 /* This program is free software; you can redistribute it and/or modify it
9 under the terms of the license (GNU LGPL) which comes with this package. */
17 grasRepportError (gras_sock_t *sock, gras_msgid_t id, int SeqCount,
18 const char *severeError,
19 gras_error_t errcode, const char* format,...) {
23 if (!(error=(msgError_t*)malloc(sizeof(msgError_t)))) {
24 fprintf(stderr,severeError);
28 error->errcode=errcode;
30 vsprintf(error->errmsg,format,ap);
33 /* FIXME: If message id have more than 17 sequences, the following won't work */
34 if (gras_msg_new_and_send(sock,id,SeqCount, error,1,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0,
35 NULL,0,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0)) {
36 fprintf(stderr,severeError);