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
 
@@ -20,23 +20,27 @@ AC_INIT([distren],[0.0],[ohnobinki@ohnop
 
AC_CONFIG_SRCDIR([src/server/distrend.c])
 

	
 
AC_PROG_CC
 
AC_PROG_LIBTOOL
 

	
 
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
 
])
 

	
 
AC_OUTPUT
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
 
@@ -9,30 +9,27 @@
 
  (at your option) any later version.
 

	
 
  DistRen is distributed in the hope that it will be useful,
 
  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
  GNU Affero General Public License for more details.
 

	
 
  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
 
 * interface).
 
 *
 
 *
 
 *
 
 * Notes from IRCness:
 
 * Server<==>Client Communication
 
@@ -64,30 +61,29 @@ static MYSQL *conn;                     
 

	
 
int main(int argc, char *argv[])
 
{
 

	
 

	
 
// It's a happy fun mySQL party! This just test-connects to the server and does absolutely nothing else. Hopefully.
 

	
 
	/* 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)