Changeset - f919148db633
[Not reviewed]
default
0 3 0
Nathan Brink (binki) - 16 years ago 2009-03-31 22:31:59
ohnobinki@ohnopublishing.net
distrend: removed wrong mysql includes, fixed bad calls to exit(), removed trailing backslash
3 files changed with 8 insertions and 8 deletions:
0 comments (0 inline, 0 general)
configure.ac
Show inline comments
 
@@ -26,14 +26,18 @@ AM_INIT_AUTOMAKE
 
AM_PROG_CC_C_O
 
AM_PATH_CHECK
 
AM_PATH_XML2(2.7.2)
 

	
 
PKG_PROG_PKG_CONFIG(0.17.2)
 

	
 
AC_CHECK_MYSQLR
 
PKG_CHECK_MODULES(DISTLIBS, libconfuse >= 2.6)
 

	
 
AC_SUBST([MYSQL_LIBS])
 
AC_SUBST([MYSQL_CFLAGS])
 

	
 
AC_CONFIG_FILES([Makefile
 
src/Makefile
 
src/common/Makefile
 
src/server/Makefile
 
src/client/Makefile
 
src/tests/Makefile
src/server/Makefile.am
Show inline comments
 
bin_PROGRAMS = distrend
 
distrend_SOURCES = distrend.c
 
distrend_LDADD = @DISTLIBS_LIBS@ @top_builddir@/src/common/libdistren.la
 
distrend_CFLAGS = @DISTLIBS_CFLAGS@ -I@top_srcdir@/src/common
 
distrend_LDADD = @DISTLIBS_LIBS@ @MYSQL_LIBS@ @top_builddir@/src/common/libdistren.la
 
distrend_CFLAGS = @DISTLIBS_CFLAGS@ @MYSQL_CFLAGS@ -I@top_srcdir@/src/common
src/server/distrend.c
Show inline comments
 
@@ -15,18 +15,15 @@
 

	
 
  You should have received a copy of the GNU Affero General Public License
 
  along with DistRen.  If not, see <http://www.gnu.org/licenses/>.
 

	
 
*/
 

	
 
#include <my_global.h> /* This provides windows compat too */
 
#include <my_sys.h>
 
#include <mysql.h>
 
#include <stdio.h>
 

	
 

	
 
/* Just some notes -- Ethan Zonca
 
 *
 
 * So I read the IRC transcript, and we need some communication and plugin (e.g., blender, povray) standards.
 
 * In addition to those standards, we should also have standards for information availability,
 
 * making statistics and remote control of each plugin or the whole system standard and common,
 
 * so other apps can grab stats from it (such as a j2me phone DistRen status app or a php web
 
@@ -70,24 +67,23 @@ int main(int argc, char *argv[])
 

	
 
	/* initialize connection handler */
 
	conn = mysql_init (NULL);
 
	if (conn == NULL)
 
	{
 
	    fprintf (stderr, "mysql_init() failed (probably out of memory)\n");
 
	    exit (1);
 
	    return 1;
 
	}
 
	/* connect to server */
 
	if (mysql_real_connect (conn, opt_host_name, opt_user_name, opt_password,
 
	        opt_db_name, opt_port_num, opt_socket_name, opt_flags) == NULL)
 
	{
 
	    fprintf (stderr, "mysql_real_connect() failed\n");
 
	    mysql_close (conn);
 
	    exit (1);
 
	    return 1;
 
	}
 
	/* disconnect from server */
 
	mysql_close (conn);
 

	
 

	
 
  return 0;
 
}
 

	
 
\
0 comments (0 inline, 0 general)