GRASS Programmer's Manual  6.4.1(2011)
d_priv.c
Go to the documentation of this file.
00001 
00015 #include <stdlib.h>
00016 #include <grass/dbmi.h>
00017 #include "macros.h"
00018 #include "dbstubs.h"
00019 
00026 int db_d_grant_on_table(void)
00027 {
00028     dbString tableName;
00029     int priv, to;
00030     int stat;
00031 
00032     db_init_string(&tableName);
00033 
00034     /* get the arg(s) */
00035     DB_RECV_STRING(&tableName);
00036     DB_RECV_INT(&priv);
00037     DB_RECV_INT(&to);
00038 
00039     /* call the procedure */
00040     stat = db_driver_grant_on_table(&tableName, priv, to);
00041     db_free_string(&tableName);
00042 
00043     /* send the return code */
00044     if (stat != DB_OK) {
00045         DB_SEND_FAILURE();
00046         return DB_OK;
00047     }
00048     DB_SEND_SUCCESS();
00049 
00050     /* no results */
00051 
00052     return DB_OK;
00053 }
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines